package study.saas.order.service;

import study.saas.common.facade.BaseFacade;
import study.saas.common.util.viewmodel.ApiResultV2;
import study.saas.common.util.viewmodel.PageModel;
import study.saas.order.entity.Commodity;
import study.saas.order.service.model.CommodityAddDTO;
import study.saas.order.service.model.CommodityFilterDTO;
import study.saas.order.service.model.CommodityModifyDTO;

/**
 * @author wwy
 */
public interface CommodityFacade extends BaseFacade<Commodity> {
    /**
     * 添加商品
     */
    ApiResultV2<Commodity> addCommodity(CommodityAddDTO add);

    /**
     * 删除商品
     */
    ApiResultV2<Commodity> deleteCommodity(String commodityName);

    /**
     * 查询商品详情
     * @return
     */

    ApiResultV2<Commodity> findCommodity(String commodityName);

    /**
     * 修改商品
     */
    ApiResultV2<Commodity> modifyCommodity(CommodityModifyDTO modify);
    /**
     * 修改商品
     * @return
     */
    ApiResultV2<PageModel<Commodity>> listCommodity(CommodityFilterDTO filter);



}
